Skip to content

Add GitHub workflow and Update dependency#10

Open
alikemalocalan wants to merge 4 commits intostitchdata:masterfrom
Spendit-AG:master
Open

Add GitHub workflow and Update dependency#10
alikemalocalan wants to merge 4 commits intostitchdata:masterfrom
Spendit-AG:master

Conversation

@alikemalocalan
Copy link
Copy Markdown

Description of change

This PR includes the latest two commits focused on Maven project and release configuration improvements.

What changed

  • Updated build/release plugin setup in pom.xml (source, javadoc, GPG signing, Nexus staging, and release flow).
  • Refined publishing-related configuration for OSSRH deployment.
  • Updated/maintained dependency and plugin versions to keep the project configuration current and stable.

Why

These changes improve release reliability and maintainability of the Java Stitch Client build pipeline, while keeping runtime behavior unchanged.

QA steps

  • automated tests passing
  • manual qa steps passing (list below)

Manual QA steps:

  1. Run a clean build and verify packaging succeeds.
  2. Run the full test suite and confirm all tests pass.
  3. Verify source and javadoc artifacts are generated.
  4. Verify release-related Maven configuration is resolved correctly (without performing an actual production release).

Risks

  • Release/publish workflow risk: misconfiguration could affect artifact signing or staging.
  • Build-time compatibility risk: plugin version changes may behave differently across local/CI environments.
  • Low runtime risk: changes are primarily build/release configuration, not core client logic.

Rollback steps

  • Revert this branch.
  • Re-run CI to confirm previous build/release behavior is restored.

@spendito-peter
Copy link
Copy Markdown

@psantacl @cmerrick @mdelaurentis

Would it be possible for you to review this request? Due to severe vulnerabilities a release with updated dependencies would be very desirable.

Thank You!

@alikemalocalan fyi

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the project’s build/release setup (Maven plugins, Java level, dependencies) and adds GitHub automation, while also updating the client implementation to use Java 11’s java.net.http.HttpClient and Jakarta JSON.

Changes:

  • Update pom.xml for Java 11, newer Maven release/publish plugins, and dependency refresh (including removing Apache HttpClient in favor of JDK HTTP client).
  • Add GitHub Actions CI workflows and Dependabot configuration for Maven dependencies.
  • Replace previously “example” main classes with JUnit tests that exercise the same flows; add a test asserting HTTP/1.1 usage.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/main/java/com/stitchdata/client/StitchClient.java Switch HTTP transport to java.net.http.HttpClient, update JSON parsing, add helper for JSON content-type detection.
src/main/java/com/stitchdata/client/StitchResponse.java Migrate JSON type to jakarta.json.JsonObject.
src/main/java/com/stitchdata/client/StitchClientBuilder.java Formatting/type tweaks around Transit write handlers and builder build() formatting.
src/main/java/com/stitchdata/client/Buffer.java Import cleanup and formatting-only changes.
src/test/java/com/stitchdata/client/StitchClientTest.java Import cleanup/formatting; add test asserting client uses HTTP/1.1.
src/test/java/com/stitchdata/client/BufferTest.java Import cleanup/formatting.
src/test/java/com/stitchdata/client/SimpleExampleTest.java New test replacing the removed “simple example” main program flow.
src/test/java/com/stitchdata/client/CallbackExampleTest.java New test replacing the removed “callback example” main program flow.
src/main/java/com/stitchdata/client/examples/SimpleExample.java Removed example main program (superseded by tests).
src/main/java/com/stitchdata/client/examples/CallbackExample.java Removed example main program (superseded by tests).
pom.xml Update compiler level to 11; update Maven plugins; refresh dependencies (Transit, Jakarta JSON, JUnit), remove Apache HttpClient dependency.
.github/workflows/maven.yml New Maven build workflow (currently restricted to master).
.github/workflows/maven-unit-tests.yml New unit test workflow for Java 11/17 (currently push only).
.github/dependabot.yml New Dependabot configuration for Maven.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +248 to 251
int statusCode = response.statusCode();
String reasonPhrase = "";
String contentType = response.headers().firstValue("Content-Type").orElse(null);
JsonObject content = null;
Comment on lines 233 to +238
StitchResponse sendToStitch(String body) throws IOException {
Request request = Request.Post(stitchUrl)
.connectTimeout(connectTimeout)
.addHeader("Authorization", "Bearer " + token)
.bodyString(body, CONTENT_TYPE);

HttpResponse response = request.execute().returnResponse();
int statusCode = response.getStatusLine().getStatusCode();
String reasonPhrase = response.getStatusLine().getReasonPhrase();
ContentType contentType = ContentType.get(response.getEntity());
HttpRequest request = HttpRequest.newBuilder(URI.create(stitchUrl))
.header("Authorization", "Bearer " + token)
.header("Content-Type", CONTENT_TYPE)
.POST(HttpRequest.BodyPublishers.ofString(body, StandardCharsets.UTF_8))
.build();
Comment on lines +13 to +15
branches: [ "master" ]
pull_request:
branches: [ "master" ]
name: Maven Unit Tests

on:
push:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants